package com.cyan.learn.pattern.command;

public class CommandTest {
    public static void main(String[] args) {
        // 下单
        Order order = new Order();
        order.setDiningTable(1);
        order.setFoodDir("青椒炒肉", 2);
        order.setFoodDir("可乐", 3);

        Order order1 = new Order();
        order1.setDiningTable(2);
        order1.setFoodDir("干炒牛河", 1);
        order1.setFoodDir("雪碧", 2);

        // 厨师
        SeniorChef seniorChef = new SeniorChef();
        OrderCommand command = new OrderCommand(seniorChef, order);
        OrderCommand command1 = new OrderCommand(seniorChef, order1);

        // 服务员下单到厨房做菜
        Waiter waiter = new Waiter();
        waiter.addCommands(command);
        waiter.addCommands(command1);
        waiter.orderUp();
    }
}
